package com.sghd.candy.module.skill.facade;

import com.sghd.common.socket.anno.InBody;
import com.sghd.common.socket.anno.InSession;
import com.sghd.common.socket.anno.SocketCommand;
import com.sghd.common.socket.anno.SocketModule;
import com.sghd.pojo.candy.skill.vo.SkillVo;
import com.sghd.pojo.fight.game.Result;
import com.sghd.pojo.fight.game.RsetSkillVo;

import static com.sghd.candy.utils.SocketEnum.*;
import static com.sghd.common.socket.session.SessionKeys.IDENTITY;
import static com.sghd.common.socket.session.SessionKeys.MANAGEMENT;

/**
 * @author Allen
 * @date 2018/12/10
 */
@SocketModule()
public interface SkillFacade {
    /**
     * 选择技能
     * @param playerId
     * @param skillId
     * @return
     */
    @SocketCommand(SKILL_SELECT)
    Result<String> selectSkill(@InSession(IDENTITY) long playerId, @InBody("skillId") int skillId);

    /**
     * 移除技能
     * @param playerId
     * @param skillId
     * @return
     */
    @SocketCommand(SKILL_REMOVE)
    Result<String> removeSkill(@InSession(IDENTITY) long playerId, @InBody("skillId") int skillId);

    /**
     * 技能列表
     * @param playerId
     * @return
     */
    @SocketCommand(SKILL_LIST)
    SkillVo skillList(@InSession(IDENTITY) long playerId);

    /**
     * 升级技能
     * @param playerId
     * @param skillId
     * @return
     */
    @SocketCommand(SKILL_UPGRADE)
    Result<String> upgrade(@InSession(IDENTITY) long playerId, @InBody("skillId") int skillId);

    /**
     * PVP匹配 更换/锁定技能消耗金币
     * @param ip
     * @param resetVo
     * @return
     */
    @SocketCommand(SKILL_RANDOM)
    RsetSkillVo random(@InSession(MANAGEMENT) String ip, RsetSkillVo resetVo);

}
